import { PrimaryUuid, Entity, Int, Code, RichText, CreateDate, UpdateDate } from "../utils";
import { Index } from "typeorm";

@Entity({
    name: 'fj_policy'
})
@Index("FJ_POLICY_FROM_SOURCEID", ["from", 'sourceid'])
export class FjPolicy {
    @PrimaryUuid()
    id: string;

    @Int()
    sourceid: number;

    @Code({ default: '' })
    type: string;

    @RichText({ default: '' })
    content: string;

    @RichText({ default: '' })
    content_cn: string;

    @Code({ default: '' })
    from: string;

    @Code({ nullable: true })
    hash: string;

    @CreateDate()
    create_date: Date;

    @UpdateDate()
    update_date: Date;
}
